package com.example.demo.mapper;

import com.example.demo.bean.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    @Select("select r.rolename,r.id,r.rolename from user u,role r,user_role ur  where u.id=ur.uid and r.id=ur.rid  and u.id=#{id}")
    List<Role> findById(int id);
}
